package com.funcourse.demo.model.repo.room;

import com.funcourse.demo.model.User;
import com.funcourse.demo.model.room.AttenderRoomRelation;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

public interface AttenderRoomRelationRepo extends MongoRepository<AttenderRoomRelation,String> {

  Page<AttenderRoomRelation> findByAttenderId(String attenderId,Pageable pageable);

  List<AttenderRoomRelation> deleteByAttenderIdAndRoomId(String attenderId,String roomId);
  List<AttenderRoomRelation> deleteByRoomId(String roomId);

}
